<%@ page import="com.wuming.caiwu.security.SecurityHander" %>
<%--
  Created by IntelliJ IDEA.
  User: hanfei
  Date: 18/7/19
  Time: 下午4:36
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>收款账号详情</title>
    <link rel="stylesheet" href="${allServerPath}static/layui/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="${allServerPath}static/layui/css/style.css">
    <link rel="stylesheet" href="${allServerPath}static/layui/css/icon.css">
    <link rel="stylesheet" href="${allServerPath}static/layui/css/public.css">
</head>
<body style="background-color: #f0f2f5;" class="childrenBody">
<div class="layui-fluid wuli-main">
    <div class="layui-row">
        <fieldset class="layui-elem-field layui-field-title">
            <legend>收款账号详情</legend>
        </fieldset>
    </div>
    <form class="layui-form wuli-jiaofei-top" id="reportForm">
        <div class="layui-form-item">
            <input type="hidden" name="memberId" value="<%=SecurityHander.getCurrentUserId()%>"/>

            <%--<input type="hidden" name="payType" value="1"/>--%>
            <div class="layui-inline">
                <label class="layui-form-label">收款账号名称</label>

                <div class="layui-input-inline">
                    <input type="text" name="claimAdjuster" autocomplete="off"
                           class="layui-input" value="${adjuster.claimAdjuster}">
                </div>
            </div>

            <div class="layui-inline">
                <label class="layui-form-label">收款人手机</label>

                <div class="layui-input-inline">
                    <input type="text" name="mobile" autocomplete="off"
                           class="layui-input" value="${adjuster.mobile}">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">收款卡号</label>

                <div class="layui-input-inline">
                    <input type="text" name="claimAdjusterCardno" autocomplete="off"
                           class="layui-input" value="${adjuster.claimAdjusterCardno}">
                </div>
            </div>

            <div class="layui-inline">
                <label class="layui-form-label">收款证件号</label>

                <div class="layui-input-inline">
                    <input type="text" name="claimAdjusterCertno" autocomplete="off"
                           class="layui-input" value="${adjuster.claimAdjusterCertno}">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">开户银行</label>

                <div class="layui-input-inline">
                    <input type="text" name="bankName" autocomplete="off"
                           class="layui-input" value="${adjuster.bankName}">
                </div>
            </div>

            <div class="layui-inline">
                <label class="layui-form-label">开户支行</label>

                <div class="layui-input-inline">
                    <input type="text" name="subbranchName" autocomplete="off"
                           class="layui-input" value="${adjuster.subbranchName}">
                </div>
            </div>

        </div>
        <div class="layui-row wuli-jiaofei" style="text-align: center">
            <button name="btnSave" type="button" class="layui-btn layui-btn-normal">保存</button>
        </div>
        <input type="hidden" name="id" value="${adjuster.id}">
    </form>
</div>
<script src="${allServerPath}static/layui/layui/layui.js" charset="utf-8"></script>
<script>
    layui.use(['layer', 'form'], function () {
        var form = layui.form
            , layer = layui.layer
            , $ = layui.$;

        $("button[name='btnSave']").click(function () {
            $.ajax({
                type: 'post',
                url: '${allServerPath}web/adjuster/save.htmls',
                data: $("#reportForm").serialize(),
                dataType: 'JSON',
                success: function (data) {
                    if (data.success) {
                        layer.msg("保存成功.");
                        var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
                        parent.layer.close(index); //再执行关闭
                    } else {
                        layer.msg("保存失败,请稍后重试.");
                    }
                },
                error: function (msg) {
                    layer.msg("保存失败.");
                }
            });
        });


    });
</script>
</body>
</html>
